package goodimpl

import "strconv"

type FreeGift struct {
	Name     string
	Quantity int
	Price    int
}

// SettleAccount 计算总价
func (gift FreeGift) SettleAccount() int {
	return gift.Quantity * gift.Price
}

// OrderInfo 商品信息
func (gift FreeGift) OrderInfo() string {
	return "您要购买" + strconv.Itoa(gift.Quantity) + "个" + gift.Name + "计：" + strconv.Itoa(gift.SettleAccount()) + "元"
}
